package com.ruoyi.loginfo.service.impl;

import java.util.List;

import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.loginfo.mapper.LogAddressMapper;
import com.ruoyi.loginfo.domain.LogAddress;
import com.ruoyi.loginfo.service.ILogAddressService;

/**
 * 物流收货地址Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-15
 */
@Service
public class LogAddressServiceImpl implements ILogAddressService 
{
    @Autowired
    private LogAddressMapper logAddressMapper;

    /**
     * 查询物流收货地址
     * 
     * @param id 物流收货地址主键
     * @return 物流收货地址
     */
    @Override
    public LogAddress selectLogAddressById(Long id)
    {
        return logAddressMapper.selectLogAddressById(id);
    }

    /**
     * 查询物流收货地址列表
     * 
     * @param logAddress 物流收货地址
     * @return 物流收货地址
     */
    @Override
    public List<LogAddress> selectLogAddressList(LogAddress logAddress)
    {
        return logAddressMapper.selectLogAddressList(logAddress);
    }

    /**
     * 新增物流收货地址
     * 
     * @param logAddress 物流收货地址
     * @return 结果
     */
    @Override
    public int insertLogAddress(LogAddress logAddress)
    {
        System.out.println(logAddress);
        return logAddressMapper.insertLogAddress(logAddress);
    }

    /**
     * 修改物流收货地址
     * 
     * @param logAddress 物流收货地址
     * @return 结果
     */
    @Override
    public int updateLogAddress(LogAddress logAddress)
    {
        return logAddressMapper.updateLogAddress(logAddress);
    }

    /**
     * 批量删除物流收货地址
     * 
     * @param ids 需要删除的物流收货地址主键
     * @return 结果
     */
    @Override
    public int deleteLogAddressByIds(Long[] ids)
    {
        return logAddressMapper.deleteLogAddressByIds(ids);
    }

    /**
     * 删除物流收货地址信息
     * 
     * @param id 物流收货地址主键
     * @return 结果
     */
    @Override
    public int deleteLogAddressById(Long id)
    {
        return logAddressMapper.deleteLogAddressById(id);
    }

    @Override
    public List<LogAddress> getAddress(Long id) {
        return logAddressMapper.getAddress(id);
    }
}
